import { _decorator, Component, Node } from 'cc';
import ResLoader, { AssetBundle } from '../../sgame/resource/ResLoader';
import { Prefab } from 'cc';
import { llog } from '../../sgame/logger/Logger';
import SUI from '../../sgame/ui/SUI';
const { ccclass, property } = _decorator;

@ccclass('ResLoaderTest')
export class ResLoaderTest extends Component {
    async start() {
        let bundle = await ResLoader.LoadBundleSync("test_resource");
        let testPrefab: Prefab = await ResLoader.LoadAssetSync<Prefab>("test_resource/prefabs/test");
        llog("testPrefab", testPrefab);

        SUI.InitPrefab("test_resource/prefabs/test", this.node);
    }
}

